package com.k.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.k.demo.entity.Balance;
import com.k.demo.mapper.BalanceMapper;
import com.k.demo.service.BalanceService;
@Service
public class BalanceServiceImpl implements BalanceService {
	
	@Autowired
	private BalanceMapper balanceMapper;

	@Override
	public List<Balance> getFromStartToEnd(String start_date, String end_date) {
		// TODO Auto-generated method stub
		return balanceMapper.selectFromStartToEnd(start_date, end_date);
	}

	@Override
	public int addBalance(Balance balance) {
		// TODO Auto-generated method stub
		return balanceMapper.insert(balance);
	}

	@Override
	public Balance getTodaysBalance() {
		// TODO Auto-generated method stub
		return balanceMapper.seleteTodaysBalance();
	}
}
